package com.intelligentcar.springboot.service.serverImpl;

import com.intelligentcar.springboot.bean.Advertisement;
import com.intelligentcar.springboot.bean.Manager;
import com.intelligentcar.springboot.bean.Partner;
import com.intelligentcar.springboot.mapper.AdvertisementMapper;
import com.intelligentcar.springboot.mapper.ManagerMapper;
import com.intelligentcar.springboot.service.AdvertisementService;
//import com.intelligentcar.springboot.service.ManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.naming.StringRefAddr;
import java.util.List;


@Service
public class AdvertisementServerImpl implements AdvertisementService {

    @Autowired
    private AdvertisementMapper advertisementMapper;

//    @Override
//    public List<Advertisement> Lookpname(String Input, String pname, String advertInfo, String addTime ,String adlocation) {
//        return advertisementMapper.Lookpname(Input,pname,advertInfo, addTime,adlocation);
//    }

    @Override
    public List<Advertisement> Lookpname(Advertisement advertisement) {
        return advertisementMapper.Lookpname(advertisement);
    }

    //    @Override
//    public List<Advertisement> LookadvertInfo(String advertInfo) {
//        return advertisementMapper.LookadvertInfo(advertInfo);
//    }
//
    @Override
    public List<Advertisement> LookaddTime(String addTime) {
        return advertisementMapper.LookaddTime(addTime);
    }

//    @Override
//    public List<Advertisement> Lookadlocation(String adlocation) {
//        return advertisementMapper.Lookadlocation(adlocation);
//    }

    @Override
    public List<Advertisement> LookAdvertisement() {
        return advertisementMapper.LookAdvertisement();
    }

    @Override
    public List<Partner> LookAdvertisement11() {
        return advertisementMapper.LookAdvertisement11();
    }

    @Override
    public int selectAdvertisement() {
        return advertisementMapper.selectAdvertisement();
    }

    @Override
    public int updateAdvertisement(long adid,String advertPicutre, String advertInfo, String adlocation, String addTime) {
        return advertisementMapper.updateAdvertisement(adid,advertPicutre,advertInfo,adlocation,addTime);
    }

    @Override
    public int deleteAdvertisement(long id) {
        return advertisementMapper.deleteAdvertisement(id);
    }

    @Override
    public int addAdvertisement(long adid,String advertPicutre, String advertInfo, String addTime, String adlocation) {
        return advertisementMapper.addAdvertisement(adid,advertPicutre,advertInfo,addTime,adlocation);
    }

}
